<%@page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@include file="/includes/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
            
    <script type="text/javascript">
    <!-- 
    $(document).ready(function() {
    	$("#doPassBtn").click(function() {

    			$('#hidden\\.editTempUser\\.confirmStatus').val('Y');
    			$('#hidden\\.editTempUser\\.recordStatus').val("<c:out value='${actionBean.editTempUser.recordStatus}'/>");
    			return true;
		});
		
		$("#doBackBtn").click(function() {
    			$('#hidden\\.editTempUser\\.confirmStatus').val('N');
				$('#hidden\\.editTempUser\\.recordStatus').val("<c:out value='${actionBean.editTempUser.recordStatus}'/>");
    			return true;
		});
		//全選 
      $('#checkboxAll').click(function() 
        {
         var chk = $('#checkboxAll').attr('checked');   			
         $('#queryUserForm input:checkbox').each(function(){  
         
         if("checked"==chk){ 
    		 $(this).attr('checked', chk);
    		}  				
    	else{
			 $(this).removeAttr('checked');
    		}
           });
        });
         
		//取消
		$("#doCancelBtn").click(function() {
			$("#hidden\\.doCancelBtn").trigger('click');
		});
		
		
		<c:if test="${not empty actionBean.message}">
   			showMessageDialog('<c:out value="${actionBean.message }" escapeXml="false"/>');
		</c:if>	
    });
    
    //-->
    </script>
</head>
<body>
	<div id="smallQueryForm"></div>
	<stripes:form id="queryTempUserForm" beanclass="com.feib.stms.action.Stms9015ActionBean" method="post">
	<div id="queryForm">
		<table>
			<tr>
				<td colspan="5" class="queryHeader">使用者放行</td>
			</tr>
			<tr>
				<th>使用者ID<span id="mustKeyInStar">**</span></th>
				<td>
					<c:out value="${actionBean.editTempUser.user.userId }" />
					<br/><font color="blue"><c:out value="${actionBean.showEditUser.userId }" /></font>
				</td>
				<th>姓名<span id="mustKeyInStar">**</span></th>
				<td colspan="2">
					<c:out value="${actionBean.editTempUser.user.userName }" />
					<br/><font color="blue"><c:out value="${actionBean.showEditUser.userName }" /></font>
				</td>
			</tr>
			<tr>
				<th>電話</th>
				<td>
					<c:out value="${actionBean.editTempUser.user.userPhoneNo }" />
					<br/><font color="blue"><c:out value="${actionBean.showEditUser.userPhoneNo }" /></font>
				</td>
				<th>E-MAIL<span id="mustKeyInStar">**</span></th>
				<td colspan="2">
					<c:out value="${actionBean.editTempUser.user.userEmail }" />
					<br/><font color="blue"><c:out value="${actionBean.showEditUser.userEmail }" /></font>
				</td>
			</tr>
			<tr>
				<th>啟用</th>
				<td>
					<stripes:select id="editEnabled" name="editTempUser.enabled" disabled="true">
	                      <stripes:option value="true" label="是"/>
	                      <stripes:option value="false" label="否"/>
                    </stripes:select>
                    <c:if test="${!empty actionBean.showEditUser && actionBean.showEditUser.enabled eq true }">
						<br/><font color="blue"><c:out value="是" /></font>
					</c:if>
					<c:if test="${!empty actionBean.showEditUser && actionBean.showEditUser.enabled eq false}">
						<br/><font color="blue"><c:out value="否" /></font>
					</c:if>               
				</td>
				<th>鎖定</th>
				<td colspan="2">
					<stripes:select id="editLocked" name="editTempUser.locked" disabled="true">
	                      <stripes:option value="true" label="是"/>
	                      <stripes:option value="false" label="否"/>
                    </stripes:select>
                    <c:if test="${!empty actionBean.showEditUser  && actionBean.showEditUser.locked eq true}">
						<br/><font color="blue"><c:out value="是" /></font>
					</c:if>
					<c:if test="${!empty actionBean.showEditUser  && actionBean.showEditUser.locked eq false}">
						<br/><font color="blue"><c:out value="否" /></font>
					</c:if>                
				</td>
			</tr>
			<tr>
				<th>憑證序號</th>
				<td>
					<c:out value="${actionBean.editTempUser.user.certificateKey }" />
					<br/><font color="blue"><c:out value="${actionBean.showEditUser.certificateKey }" /></font>
				</td>
				<th>備註</th>
				<td colspan="2">
					<c:out value="${actionBean.editTempUser.user.userNote }" />
					<br/><font color="blue"><c:out value="${actionBean.showEditUser.userNote }" /></font>
				</td>
			</tr>
			<c:if test="${!actionBean.isBankGroupUser}">
			<tr>
				<th>可處理資料</th>
				<td colspan="4">
					<c:if test="${!empty actionBean.dealSecuritiesNos }">
					<input type="checkbox" name="checkboxAll" id="checkboxAll" value="全選" disabled="disabled"/>全選&nbsp;
					<c:forEach items="${actionBean.dealSecuritiesNos}" var="dealSecuritiesNosObj" varStatus="rowstat">
						<input disabled="disabled" name="qryDealSecuritiesNos[${rowstat.index}]" type="checkbox" id="qryDealSecuritiesNos[${rowstat.index}]" <c:if test="${dealSecuritiesNosObj.checked }">checked="checked"</c:if> value="<c:out value='${dealSecuritiesNosObj.value}'/>" />
						<c:out value="${dealSecuritiesNosObj.label}"/>&nbsp;	
					</c:forEach>
					</c:if>
					<c:forEach items="${actionBean.showDealSecuritiesNos}" var="showDealSecuritiesNo" varStatus="rowstat">
						<br/><font color="blue"><c:out value="${showDealSecuritiesNo.label }" /> &nbsp;</font>
					</c:forEach>
				</td>
			</tr>	
			<tr>
			<th>所屬分公司</th>
			<td colspan="4">
				<stripes:select id="editSecurities_Pk" name="editTempUser.securities.securitiesPk" disabled="true">
					<c:forEach items="${actionBean.securitiesOptionList }" var="viewObj" varStatus="rowstat">
                      <stripes:option value="${viewObj.securitiesPk }" label="${viewObj.securitiesName }"/>
                    </c:forEach>  	                
                </stripes:select>
                <font color="blue"><c:out value="${actionBean.showEditUser.securities.securitiesName }" />&nbsp;</font>               
			</td>
			</tr>
			</c:if>
			<tr>
				<th>密碼有效時間</th>
				<td colspan="4"><fmt:formatDate value="${actionBean.editTempUser.user.pwdExpiredDate}" pattern="yyyy/MM/dd HH:mm:ss" /></td>
			</tr>
			<tr>
				<th>使用者資料維護紀錄狀態</th>
				<td colspan="4">
				<c:choose>
                  	<c:when test="${'A' == actionBean.editTempUser.recordStatus }">新增</c:when>
                  	<c:when test="${'U' == actionBean.editTempUser.recordStatus }">修改</c:when>
                   	<c:otherwise>刪除</c:otherwise>  
                 </c:choose>
				</td>
			</tr>
			<tr>
				<td colspan="5" class="queryFunction">
					<stripes:hidden name="editTempUser.tempUserPk" />
					<stripes:hidden name="editTempUser.user.userId" />
					<stripes:hidden name="editTempUser.user.group.groupPk" />
					<stripes:hidden name="operation" />
					<stripes:hidden id="hidden.editTempUser.recordStatus" name="editTempUser.recordStatus"/>
					<stripes:hidden id="hidden.editTempUser.confirmStatus" name="editTempUser.confirmStatus"/>
					<stripes:submit id="doPassBtn" name="doPass" value="放行" class="formBtn"/>
					<stripes:submit id="doBackBtn" name="doBack" value="退件" class="formBtn"/>
					<stripes:submit id="doCancelBtn" name="doCancel" value="取消" class="formBtn"/>
				</td>
			</tr>
		</table>
	</div>
		<!-- 查詢條件 -->
		<stripes:hidden id="hidden.qryTempUserIdForm" name="qryTempUserIdForm" />
		<stripes:hidden id="hidden.qryTempUserNameForm" name="qryTempUserNameForm" />
		<!-- 分頁信息 -->
		<stripes:hidden id="hidden.queryResult.pageNumber" name="queryResult.pageNumber" />
		<stripes:hidden id="hidden.queryResult.sortCriterion" name="queryResult.sortCriterion" />
		<stripes:hidden id="hidden.queryResult.sortDirection" name="queryResult.sortDirection" />
	</stripes:form>

<!-- 取消使用 -->	
<div style="display: none;">
<stripes:form id="hidden.queryTempUserForm" beanclass="com.feib.stms.action.Stms9015ActionBean" method="post" onsubmit="javascript: waitingDialog({});">
	<!-- 查詢條件 -->
	<stripes:hidden id="hidden.qryTempUserIdForm" name="qryTempUserIdForm" />
	<stripes:hidden id="hidden.qryTempUserNameForm" name="qryTempUserNameForm" />
	<!-- 分頁信息 -->
	<stripes:hidden id="hidden.queryResult.pageNumber" name="queryResult.pageNumber" />
	<stripes:hidden id="hidden.queryResult.sortCriterion" name="queryResult.sortCriterion" />
	<stripes:hidden id="hidden.queryResult.sortDirection" name="queryResult.sortDirection" />
	<stripes:submit id="hidden.doCancelBtn" name="doCancel" value="取消" class="formBtn"/>
</stripes:form>
</div>
</body>
</html>
